package com.xmy.cultivate.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.TrainPrepare;
import com.xmy.cultivate.entity.TrainPromoteShutnum;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 教师晋升关数设置 Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2025-10-18
 */
public interface TrainPromoteShutnumMapper extends BaseMapper<TrainPromoteShutnum> {



    @Select({"<script>",
            "SELECT" ,
            "*," ,
            "getDictName ( teacher_level, 47 ) AS teacher_level_name " ,
            "FROM" ,
            "train_promote_shutnum " ,
            "WHERE" ,
            "deleted = 0",
            "<when test='teacherLevel!=null and teacherLevel!=&apos;&apos; '>",
            "AND teacher_level = ${teacherLevel} ",
            "</when>",
            "<when test='num!=null and num!=&apos;&apos; '>",
            "AND num = ${num} ",
            "</when>",
            "ORDER BY created_at DESC",
            "</script>"
    })
    public IPage<TrainPromoteShutnum> findAll(IPage<?> page, @Param("teacherLevel") String teacherLevel, @Param("num") String num);

}
